var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/**
 * Person类用于表示一个人的基本信息
 * 包含姓名和年龄属性，以及打招呼的方法
 */
var Person = /** @class */ (function () {
    /**
     * 构造函数，用于创建Person实例
     * @param name 姓名
     * @param age 年龄
     */
    function Person(name, age) {
        this.name = name;
        this.age = age;
    }
    /**
     * 打招呼方法，输出问候语
     */
    Person.prototype.sayHello = function () {
        console.log("\u5927\u5BB6\u597D\uFF0C\u6211\u662F".concat(this.name, ",\u4ECA\u5E74").concat(this.age, "\u5C81"));
    };
    return Person;
}());
// 创建Person对象实例
var p = new Person("张三", 18);
// 获取并输出对象属性
console.log(p.name);
console.log(p.age);
// 调用对象方法
p.sayHello();
var Student = /** @class */ (function (_super) {
    __extends(Student, _super);
    function Student(name, age) {
        var _this = _super.call(this, name, age) || this;
        _this.name = name;
        return _this;
    }
    Student.prototype.study = function () {
        console.log("".concat(this.name, "\u6B63\u5728\u5B66\u4E60"));
    };
    return Student;
}(Person));
var s = new Student("张三", 18);
s.study();
